﻿using System;

using IFDB.Services.Application.Sites.Sources;

namespace IFDB.Console.ImportData
{
    class Program
    {
        static void Main(string[] args)
        {
            //Soccerbase soccerbase = new Soccerbase();
            //soccerbase.GetTeamLookups();
            //soccerbase.ImportMatches(DateTime.Parse("24/03/2013"));

            Espn espn = new Espn();
            espn.WriteToConsole += espn_WriteToConsole;

            espn.ImportMatches(DateTime.Parse("01/08/2012"), DateTime.Parse("31/05/2013"), 1);
            //espn.ImportResults(DateTime.Parse("01/08/2012"), DateTime.Now, 1);
            
            //espn.ImportResults(DateTime.Parse("01/08/2011"), DateTime.Parse("31/05/2012"), 1, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2010"), DateTime.Parse("31/05/2011"), 1, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2009"), DateTime.Parse("31/05/2010"), 1, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2008"), DateTime.Parse("31/05/2009"), 1, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2007"), DateTime.Parse("31/05/2008"), 1, getMatchDetail);

            
            //espn.ImportResults(DateTime.Parse("01/08/2011"), DateTime.Parse("28/04/2012"), 2, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2010"), DateTime.Parse("07/05/2011"), 2, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2009"), DateTime.Parse("02/05/2010"), 2, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2008"), DateTime.Parse("03/05/2009"), 2, getMatchDetail);
            //espn.ImportResults(DateTime.Parse("01/08/2007"), DateTime.Parse("04/05/2008"), 2, getMatchDetail);

            System.Console.WriteLine("\nPress any key to exit.");
            System.Console.ReadKey();
        }

        static void espn_WriteToConsole(string status)
        {
            System.Console.WriteLine(status);
        }
    }
}
